package com.xrx.webtemplate.web.service.biz;

import com.xrx.webtemplate.web.service.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by xierongxian on 2017/4/23.
 */
@Service("userApiBiz")
public class UserApiBiz {

    @Autowired
    private UserDao userDao;

    /**
     * 根据用户id查询用户角色
     * */
    public List<Map<String,String>> searchUserRole(String userid){
        Map<String,String> parmMap=new HashMap<String, String>();
        parmMap.put("userid",userid);
        return userDao.searchUserRole(parmMap);

    }

    /**
     * 根据角色id查询权限菜单
     * */
    public List<Map<String,String>> searchMenu(String userid){
        Map<String,String> parmMap=new HashMap<String, String>();
        parmMap.put("userid",userid);
        return userDao.searchMenu(parmMap);

    }
}
